home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / sources / shade / project.c < prev    next >
C/C++ Source or Header  |  2004-08-03  |  3KB  |  129 lines

  1. ;/*
  2.    F_Create.rexx LIB Feelin:LIBS/Feelin/Shade.fc 3 10
  3.    QUIT
  4.    ________________________________________________________________________
  5.  
  6.    (03.10) 2003/08/19
  7.  
  8.    [IMP] All gadgets rendering are now buffered (if possible), and not only
  9.    the  title  bar.  The  FC_TextDisplay object used by the title bar is no
  10.    longer created on the fly when the title  bar  need  to  be  drawn,  but
  11.    create on FM_Setup. The preparse string are now resolved with preference
  12.    items "FP_Decorator_PreParse" & "FP_Decorator_AltPreParse".
  13.  
  14. */
  15.  
  16. #include "Private.h"
  17.  
  18. struct FeelinBase                  *FeelinBase;
  19. struct FeelinClass                 *GadgetClass;
  20. ULONG                               FC_Area_Offset;
  21. ULONG                               FC_Gadget_Offset;
  22.  
  23. ///METHODS
  24. F_METHOD(void,Gad_New);
  25. F_METHOD(void,Gad_Setup);
  26. F_METHOD(void,Gad_Cleanup);
  27. F_METHOD(void,Gad_Show);
  28. F_METHOD(void,Gad_Hide);
  29. F_METHOD(void,Gad_Layout);
  30. F_METHOD(void,Gad_Draw);
  31. F_METHOD(void,Gad_HandleEvent);
  32.  
  33. F_METHOD(void,Shade_New);
  34. F_METHOD(void,Shade_Get);
  35. F_METHOD(void,Shade_Setup);
  36. F_METHOD(void,Shade_Cleanup);
  37. F_METHOD(void,Shade_Show);
  38. F_METHOD(void,Shade_Layout);
  39. F_METHOD(void,Shade_Draw);
  40. F_METHOD(void,Shade_GoActive);
  41. F_METHOD(void,Shade_GoInactive);
  42. //+
  43.  
  44. ///EXIT
  45. F_EXIT()
  46. {
  47.    F_DeleteClass(GadgetClass); GadgetClass = NULL;
  48. }
  49. //+
  50. ///INIT
  51. F_INIT()
  52. {
  53.    static struct FeelinMethodEntry Handlers[] =
  54.    {
  55.       (FMethod) Gad_New,         NULL, FM_New,
  56.       (FMethod) Gad_Setup,       NULL, FM_Setup,
  57.       (FMethod) Gad_Cleanup,     NULL, FM_Cleanup,
  58.       (FMethod) Gad_Show,        NULL, FM_Show,
  59.       (FMethod) Gad_Hide,        NULL, FM_Hide,
  60.       (FMethod) Gad_Draw,        NULL, FM_Draw,
  61.       (FMethod) Gad_Layout,      NULL, FM_Layout,
  62.       (FMethod) Gad_HandleEvent, NULL, FM_HandleEvent,
  63.  
  64.        NULL
  65.    };
  66.  
  67.    static struct TagItem Tags[] =
  68.    {
  69.       FA_Class_Super,         (ULONG) FC_Area,
  70.       FA_Class_LODSize,       (ULONG) sizeof (struct GAD_LocalObjectData),
  71.       FA_Class_MethodsTable,  (ULONG) Handlers,
  72.  
  73.       TAG_DONE
  74.    };
  75.  
  76.    if (GadgetClass = F_CreateClassA(Tags))
  77.    {
  78.       FC_Area_Offset   = GadgetClass -> Super -> Offset;
  79.       FC_Gadget_Offset = GadgetClass -> Offset;
  80.  
  81.       return TRUE;
  82.    }
  83.  
  84.    return FALSE;
  85. }
  86. //+
  87. ///QUERY
  88. F_QUERY()
  89. {
  90.    FeelinBase = Feelin;
  91.  
  92.    switch (Which)
  93.    {
  94.       case FV_Query_ClassTags:
  95.       {
  96.          static struct FeelinMethodEntry Handlers[] =
  97.          {
  98.             (FMethod) Shade_New,        NULL, FM_New,
  99.             (FMethod) Shade_Get,        NULL, FM_Get,
  100.  
  101.             (FMethod) Shade_Setup,      NULL, FM_Setup,
  102.             (FMethod) Shade_Cleanup,    NULL, FM_Cleanup,
  103.             (FMethod) Shade_Show,       NULL, FM_Show,
  104.             (FMethod) Shade_Layout,     NULL, FM_Layout,
  105.             (FMethod) Shade_Draw,       NULL, FM_Draw,
  106.             (FMethod) Shade_GoActive,     NULL, FM_GoActive,
  107.             (FMethod) Shade_GoInactive,   NULL, FM_GoInactive,
  108.              NULL
  109.          };
  110.  
  111.          static struct TagItem Tags[] =
  112.          {
  113.             FA_Class_Super,            (ULONG) FC_Decorator,
  114.             FA_Class_LODSize,          (ULONG) sizeof (struct LocalObjectData),
  115.             FA_Class_MethodsTable,     (ULONG) Handlers,
  116.  
  117.             FA_Class_Init,             (ULONG) FCC_Init,
  118.             FA_Class_Exit,             (ULONG) FCC_Exit,
  119.  
  120.             TAG_DONE
  121.          };
  122.  
  123.          return Tags;
  124.       }
  125.    }
  126.    return NULL;
  127. }
  128. //+
  129.